package cn.honqun.tinycms.domain.copier;

import cn.honqun.tinycms.domain.entity.User;
import cn.honqun.tinycms.domain.vo.UserVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface UserCopier {
    UserCopier INSTANCE = Mappers.getMapper(UserCopier.class);

    @Mapping(target = "token", ignore = true)
    UserVO toUserVO(User user);

    User toUserBO(UserVO userVO);
}
